﻿<!DOCTYPE html>
<html>

<head>
	{include head_content}
</head>

<body class="auth-bg">
	<!-- Pre Loader -->
	<div class="loading">
		<div class="spinner">
			<div class="double-bounce1"></div>
			<div class="double-bounce2"></div>
		</div>
	</div>
	<!--/Pre Loader -->
	<!-- Color Changer -->
	<div class="theme-settings" id="switcher" style="display: none">
		<span class="theme-click">
			<span class="ti-settings"></span>
		</span>
		<span class="theme-color theme-default theme-active" data-color="green"></span>
		<span class="theme-color theme-blue" data-color="blue"></span>
		<span class="theme-color theme-red" data-color="red"></span>
		<span class="theme-color theme-violet" data-color="violet"></span>
		<span class="theme-color theme-yellow" data-color="yellow"></span>
	</div>
	<!-- /Color Changer -->
	<div class="wrapper">
		<!-- Page Content  -->
		<div id="content">
			<div class="container">
				<div class="row">
					<div class="col-sm-6 auth-box">
						<div class="lochana-box-shadow">
							<h3 class="widget-title">登录</h3>
							<form class="widget-form" id="form">
								<!-- form-group -->
								<div class="form-group row">
									<div class="col-sm-12">
										<input name="user" placeholder="用户名" class="form-control" required="" data-validation="length alphanumeric"
											   data-validation-length="3-12"
										 data-validation-error-msg="User name has to be an alphanumeric value (3-12 chars)" data-validation-has-keyup-event="true">
									</div>
								</div>
								<!-- /.form-group -->
								<!-- form-group -->
								<div class="form-group row">
									<div class="col-sm-12">
										<input type="password" placeholder="密码" name="pass" class="form-control" data-validation="strength"
											   data-validation-strength="2"
										 data-validation-has-keyup-event="true">
									</div>
								</div>
								<!-- /.form-group -->
								<!-- Check Box -->		
								<div class="form-check row">
									<div class="col-sm-12 text-left">
										<div class="custom-control custom-checkbox">
											<input class="custom-control-input" type="checkbox" id="ex-check-2">
											<label class="custom-control-label" for="ex-check-2">保存密码</label>
										</div>
									</div>
								</div>
								<!-- /Check Box -->	
								<!-- Login Button -->			
								<div class="button-btn-block">
									<button type="button" id="login_submit" class="btn btn-primary btn-lg btn-block">登录</button>
								</div>
								<!-- /Login Button -->	
								<!-- Links -->	
								<div class="auth-footer-text" style="display: none">
									<small>New User,
										<a href="View/CQQ/sign-up.html">注册</a> Here</small>
								</div>
								<!-- /Links -->
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- /Page Content  -->
	</div>
	<!-- Jquery Library-->
	<script src="View/CQQ/js/jquery-3.2.1.min.js"></script>
	<!-- Popper Library-->
	<script src="View/CQQ/js/popper.min.js"></script>
	<!-- Bootstrap Library-->
	<script src="View/CQQ/js/bootstrap.min.js"></script>
	<!-- Custom Script-->
	<script src="View/CQQ/js/custom.js"></script>
	<script src="View/CQQ/js/jquery.jgrowl.js?v=1"></script>

	<script>
        $('#form').submit(function() {return false;});
        $("#login_submit").click(function(){
            var postdata = $('#form').serialize();
            <!--{hook t_user_login_js_1}-->
            $.post("{php HYBBS_URL('user','login');}", postdata,  function(e){
                <!--{hook t_user_login_js_2}-->
                if(e.error){
                    if(e.url !='' && e.url != 'NULL' && e.url != 'null')
                    //   $.jGrowl(e.url+'11{#WWW}');
                        window.location.href="{#WWW}";
                    else
                        window.location.href="{#WWW}";
                }else{

                    $.jGrowl(e.info,{
                        header: ' 提示',
                        animateOpen: { height: 'show'},
                        life: 1000,
                        position:'top-right'
                    });
                }
                <!--{hook t_user_login_js_3}-->
            },'json');
            <!--{hook t_user_login_js_4}-->
        })


	</script>


</body>

</html>